from selenium.webdriver.common.by import By
from Wzx.wzx9_24.xiecehng_po.Base import Base


class Page(Base):
    login_loc = (By.XPATH,'//*[@id="hp_nfes_accountbar"]/li[1]/div/button/div/span')
    def login(self):
        self.click(self.login_loc)

    username_loc = (By.XPATH,'//*[@id="bbz_accounts_pc_lg_box"]/div/div/div[1]/div[1]/form/dl[1]/dd/input')
    def usernam(self):
        self.send_keys(self.username_loc,'13235303739')

    pwd_loc = (By.XPATH,'//*[@id="bbz_accounts_pc_lg_box"]/div/div/div[1]/div[1]/form/dl[2]/dd/input')
    def pwd(self):
        self.send_keys(self.pwd_loc,'lr123456.')

    xie_loc = (By.XPATH,'//*[@id="bbz_accounts_pc_lg_box"]/div/div/div[1]/div[4]/div/div[1]')
    def xie(self):
        self.click(self.xie_loc)

    que_loc = (By.XPATH,'//*[@id="bbz_accounts_pc_lg_box"]/div/div/div[1]/div[1]/form/dl[3]/dd/input')

    def que(self):
        self.click(self.que_loc)


    def login_xiec(self):
        self.open_url('https://www.ctrip.com/')
        self.login()
        self.usernam()
        self.pwd()
        self.xie()
        self.que()